package com.frejoys.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.frejoys.dao.entity.PlatformWalletLog;
import com.frejoys.dao.mapper.PlatformWalletLogMapper;
import com.frejoys.service.PlatformWalletLogService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

@Service
@RequiredArgsConstructor
public class PlatformWalletLogServiceImpl extends ServiceImpl<PlatformWalletLogMapper, PlatformWalletLog> implements PlatformWalletLogService {

    @Override
    public boolean addInfo(Integer agentRoleGroupId, BigDecimal money, Long drawSn, Integer type, Integer createTime) {
        return save(new PlatformWalletLog(){{
            setAgentRoleGroupId(agentRoleGroupId);
            setMoney(money);
            setDrawSn(drawSn);
            setType(type);
            setCreateTime(createTime);
        }});
    }


}
